﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using l1cs.server.model.Instance;
using l1cs.server.model;

namespace l1cs.server.clientpackets
{
    public class C_BoardBack : ClientBasePacket
    {
        private const String _C_BOARD_BACK = "[C] C_BoardBack";
        private static Logger _log = Logger.getLogger( typeof( C_BoardBack ).FullName );

        public C_BoardBack( byte[] abyte0, ClientThread client )
            : base( abyte0 )
        {
            int objId = readD();
            int topicNumber = readD();
            L1Object obj = L1World.getInstance().findObject( objId );
            L1BoardInstance board = (L1BoardInstance)obj;
            board.onAction( client.getActiveChar(), topicNumber );
        }

        override
        public String getType()
        {
            return _C_BOARD_BACK;
        }
    }
}